package com.juc.phaser.phaser7;

import java.util.concurrent.Phaser;

public class Run {
    /**
     * bulkRegister() 可以批量添加parties
     * 
     */
	public static void main(String[] args) {
		Phaser phaser = new Phaser(10);
		System.out.println(phaser.getRegisteredParties());
		phaser.bulkRegister(10);
		System.out.println(phaser.getRegisteredParties());
		phaser.bulkRegister(10);
		System.out.println(phaser.getRegisteredParties());
		phaser.bulkRegister(10);
		System.out.println(phaser.getRegisteredParties());
		phaser.bulkRegister(10);
		System.out.println(phaser.getRegisteredParties());
	}
}
